package com.zkthink.ceres.order.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zkthink.base.entity.Entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * <p>
 * 实体类
 * 评价和敏感词关联表
 * </p>
 *
 * @author 黄永宗
 * @since 2020-07-14
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("ceres_comment_sensitive_relate")
@ApiModel(value = "CommentSensitiveRelate", description = "评价和敏感词关联表")
@AllArgsConstructor
public class CommentSensitiveRelate extends Entity<Long> {

    private static final long serialVersionUID = 1L;

    /**
     * 评价id
     */
    @ApiModelProperty(value = "评价id")
    @NotNull(message = "评价id不能为空")
    @TableField("comment_id")
    @Excel(name = "评价id")
    private Long commentId;

    /**
     * 敏感词id
     */
    @ApiModelProperty(value = "敏感词id")
    @NotNull(message = "敏感词id不能为空")
    @TableField("sensitive_keyword_id")
    @Excel(name = "敏感词id")
    private Long sensitiveKeywordId;

    /**
     * 是否删除0否 1是
     */
    @ApiModelProperty(value = "是否删除0否 1是")
    @NotNull(message = "是否删除0否 1是不能为空")
    @TableField("is_delete")
    @Excel(name = "是否删除0否 1是")
    private Integer isDelete;


    @Builder
    public CommentSensitiveRelate(Long id, LocalDateTime createTime, Long createUser, LocalDateTime updateTime, Long updateUser,
                    Long commentId, Long sensitiveKeywordId, Integer isDelete) {
        this.id = id;
        this.createTime = createTime;
        this.createUser = createUser;
        this.updateTime = updateTime;
        this.updateUser = updateUser;
        this.commentId = commentId;
        this.sensitiveKeywordId = sensitiveKeywordId;
        this.isDelete = isDelete;
    }

}
